package videoCourse.Structure;

import javax.swing.tree.TreeNode;

public class BinaryTreeTest {

    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryNode root = new BinaryNode(1);
        binaryTree.setRoot(root);

        BinaryNode leftNode = new BinaryNode(2);
        BinaryNode rightNode = new BinaryNode(3);
        root.setLeftNode(leftNode);
        root.setRightNode(rightNode);

        leftNode.setLeftNode(new BinaryNode(4));
        leftNode.setRightNode(new BinaryNode(5));

        rightNode.setLeftNode(new BinaryNode(6));
        rightNode.setRightNode(new BinaryNode(7));

//        binaryTree.frontShow();
//        System.out.println("00000000000000000000000000000");
//        binaryTree.midShow();
//        System.out.println("00000000000000000000000000000");
//        binaryTree.endShow();

//        BinaryNode target = binaryTree.frontSearch(8);
//        if(target==null){
//            System.out.println("null");
//        }else{
//            System.out.println(target.getValue());
//        }
//        binaryTree.frontShow();
//       binaryTree.deleteTree(5);
//        System.out.println("-------------------");
//        binaryTree.frontShow();

        
    }


}
